import { WORD_REGEX } from "./defines";

export function toSnakeLike(s: string): string {
    return s
        .replace(WORD_REGEX, function(ch) { return "_" + ch; })
        .replace(/[-_\s]+/g, "_")
        .replace(/^_+/, "")
        .toLowerCase();
}
